class Create<%= table_name.camelize %> < ActiveRecord::Migration
  def self.up
    create_table :<%= table_name %> do |t|
      t.string :name
      t.datetime :start_at
      t.datetime :end_at
      <%- if options[:use_all_day] -%>
      t.boolean :all_day, :default => false
      <%- end -%>
      <%- if options[:use_color] -%>
      t.string :color
      <%- end -%>
      
      t.timestamps
    end
  end

  def self.down
    drop_table :<%= table_name %>
  end
end
